
## 拉取镜像
docker pull swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/elasticsearch:8.11.3

## 授权目录
chmod -R 777 /data/es/data
chmod -R 777 /data/es/plugins

docker run --name elasticsearch -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms512m -Xmx1024m" \
-v /data/es/data:/usr/share/elasticsearch/data \
-v /data/es/plugins:/usr/share/elasticsearch/plugins \
-d  swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/elasticsearch:8.11.3


## 下载IK分词
https://release.infinilabs.com/analysis-ik/stable/elasticsearch-analysis-ik-8.11.3.zip


## 获取默认的随机密码

docker exec -it elasticsearch bin/elasticsearch-reset-password -u elastic --batch